package com.pig4cloud.pigx.contract.vo;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.pig4cloud.pigx.common.customize.contants.MongoTableNameConstants;
import com.pig4cloud.pigx.common.customize.utils.serializer.BigDecimalToPlainStringSerializer;
import com.pig4cloud.pigx.contract.annotation.SetScaleMainCurrency;
import com.pig4cloud.pigx.contract.annotation.SetScaleTokenCurrency;
import lombok.Data;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;

import java.math.BigDecimal;

/**
 */
@Data
@Document(MongoTableNameConstants.CONTRACT_SYMBOL)
public class AppContractSymbolIncreaseRankingVO {

	/**
	 * 币对id
	 */
	@Field("_id")
	private String symbolId;

	/**
	 * 币对名称
	 */
	@Field("name")
	private String symbolName;

	/**
	 * 24h成交金额
	 */
	@SetScaleMainCurrency
	@JsonSerialize(using = BigDecimalToPlainStringSerializer.class)
	private BigDecimal sumPrice;

	/**
	 * 涨跌幅
	 */
	@SetScaleTokenCurrency(scale = 2)
	@JsonSerialize(using = BigDecimalToPlainStringSerializer.class)
	private BigDecimal riseAndFallRange;

	/**
	 * 最新价
	 */
	@SetScaleMainCurrency
	@JsonSerialize(using = BigDecimalToPlainStringSerializer.class)
	private BigDecimal lastPrice;

	/**
	 * 是否自选
	 */
	private Boolean isOptional;

	/**
	 * logo
	 */
	private String logoImg;

}
